package com.sky.controller.client;

import com.sky.domain.Blog;
import com.sky.service.BlogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @author 尹稳健~
 * @version 1.0
 */
@Controller
public class ArchiveShowController {

    @Autowired
    private BlogService blogService;

    @GetMapping("/archives")
    public String archives(Model model){
        model.addAttribute("archiveMap",blogService.archiveBlog());
        return "archives";
    }

    @GetMapping("/about")
    public String about() {
        return "about";
    }
}
